home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / vidhrdw / aeroboto.c < prev    next >
C/C++ Source or Header  |  1999-03-03  |  2KB  |  94 lines

  1. /***************************************************************************
  2.  
  3.   vidhrdw.c
  4.  
  5.   Functions to emulate the video hardware of the machine.
  6.  
  7.   aeroboto (preliminary)
  8.  
  9. ***************************************************************************/
  10.  
  11. #include "driver.h"
  12. #include "vidhrdw/generic.h"
  13.  
  14.  
  15.  
  16. unsigned char *aeroboto_videoram;
  17. unsigned char *aeroboto_fgscroll,*aeroboto_bgscroll;
  18.  
  19. int aeroboto_charbank;
  20.  
  21.  
  22.  
  23. /***************************************************************************
  24.  
  25.   Draw the game screen in the given osd_bitmap.
  26.   Do NOT call osd_update_display() from this function, it will be called by
  27.   the main emulation engine.
  28.  
  29. ***************************************************************************/
  30. void aeroboto_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh)
  31. {
  32.     int offs;
  33.  
  34.  
  35.     for (offs = videoram_size - 1;offs >= 0;offs--)
  36.     {
  37.         int sx,sy;
  38.  
  39.  
  40.         sx = offs % 32;
  41.         sy = offs / 32;
  42.  
  43.         drawgfx(bitmap,Machine->gfx[0],
  44.                 videoram[offs] + 256 * aeroboto_charbank,
  45.                 0,
  46.                 0,0,
  47.                 8*sx - aeroboto_bgscroll[sy],8*sy,
  48.                 &Machine->drv->visible_area,TRANSPARENCY_NONE,0);
  49.         drawgfx(bitmap,Machine->gfx[0],
  50.                 videoram[offs] + 256 * aeroboto_charbank,
  51.                 0,
  52.                 0,0,
  53.                 8*sx - aeroboto_bgscroll[sy] + 256,8*sy,
  54.                 &Machine->drv->visible_area,TRANSPARENCY_NONE,0);
  55.     }
  56.  
  57.     for (offs = videoram_size - 1;offs >= 0;offs--)
  58.     {
  59.         int sx,sy;
  60.  
  61.         sx = offs % 32;
  62.         sy = offs / 32;
  63.  
  64.         drawgfx(bitmap,Machine->gfx[0],
  65.                 aeroboto_videoram[offs] + 256 * aeroboto_charbank,
  66.                 0,
  67.                 0,0,
  68.                 8*sx - aeroboto_fgscroll[sy],8*sy,
  69.                 &Machine->drv->visible_area,TRANSPARENCY_PEN,0);
  70.         drawgfx(bitmap,Machine->gfx[0],
  71.                 aeroboto_videoram[offs] + 256 * aeroboto_charbank,
  72.                 0,
  73.                 0,0,
  74.                 8*sx - aeroboto_fgscroll[sy] + 256,8*sy,
  75.                 &Machine->drv->visible_area,TRANSPARENCY_PEN,0);
  76.     }
  77.  
  78.     for (offs = spriteram_size-4;offs >= 0;offs -= 4)
  79.     {
  80.         int sx,sy;
  81.  
  82.  
  83.         sx = spriteram[offs + 3];
  84.         sy = 239 - spriteram[offs];
  85.  
  86.         drawgfx(bitmap,Machine->gfx[2],
  87.                 spriteram[offs + 1],
  88.                 spriteram[offs + 2] & 0x0f,
  89.                 0,0,
  90.                 sx,sy,
  91.                 &Machine->drv->visible_area,TRANSPARENCY_PEN,0);
  92.     }
  93. }
  94.